<?php
namespace Home\Controller;
use Think\Controller;
class LanguageController extends BaseController {


   public function _initialize(){
		
		
		
   }







   public function checkLang($lang="cn"){
   		
		
		
		
		$m = M('admin_language');
		$temp = $m->field('lang')->select();
		foreach($temp as $item){
			$checkArray[] = $item['lang'];
		}
		
		if(!in_array($lang,$checkArray)){
			$this->error('非法操作');
		}else{
			cookie('AUTH_WEB_LANG',$lang);
			$this->redirect('Index/index');
		}
		
		
		
		
   }

		
	
	
	
}